package com.light.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.light.common.mybatisplus.MybatisPlusHelper;
import com.light.common.base.BaseServiceImpl;

import java.io.Serializable;
import java.util.List;

import com.light.sys.query.SysRoleMenuQuery;
import com.light.sys.mapper.SysRoleMenuMapper;
import com.light.sys.domain.SysRoleMenuDO;
import com.light.sys.service.SysRoleMenuService;



@Service
public class SysRoleMenuServiceImpl extends BaseServiceImpl<SysRoleMenuDO, SysRoleMenuMapper> implements SysRoleMenuService {
	@Autowired
	private SysRoleMenuMapper sysRoleMenuMapper;
	
	@Override
	public List<SysRoleMenuDO> data(SysRoleMenuQuery sysRoleMenuQuery){
		QueryWrapper<SysRoleMenuDO> queryWrapper = MybatisPlusHelper.setQueryWrapperPageParam(sysRoleMenuQuery.createQueryWrapper(),sysRoleMenuQuery);
		return sysRoleMenuMapper.selectList(queryWrapper);
	}
	
	@Override
	public int count(SysRoleMenuQuery sysRoleMenuQuery){
		return sysRoleMenuMapper.selectCount(sysRoleMenuQuery.createQueryWrapper());
	}

}
